package oop.ex4.crosswords;

import oop.ex4.search.SearchBoard;

import java.util.Collection;

/**
 * An empty Crossword consists of a dictionary (loaded from dictionary file)
 * & a shape (loaded from shape file).
 * 
 * The partially or fully "filled" Crossword is able to return a list of 
 * crossword entries.
 * 
 * It is assumed that all calls to the SearchBoard's interface methods and 
 * calls to getCrosswordEntries() will always come after calls to
 * attachDictionary and attachShape methods and that attachDictionary and 
 * attachShape will be called only once per crossword.
 * 
 * @author Dima
 */
public interface Crossword extends SearchBoard<CrosswordEntry>  {

	///////////////////////////////////////////////////////
	/////////////////////Public Methods////////////////////
	///////////////////////////////////////////////////////
	
	/**
	 * Initializes all structures associated with crossword dictionary 
	 * Assumes valid and non-NULL dictionary object.
	 * @param dictionary The dictionary.
	 */
	public void attachDictionary(CrosswordDictionary dictionary);

	/**
	 * Initializes all structures associated with crossword shape 
	 * Assumes valid and non-NULL shape object.
	 * @param shape The shape.
	 */
	public void attachShape(CrosswordShape shape);

	/**
	 * Retrieves list of crossword entries associated with this Crossword. 
	 * @return A collection of filled entries.
	 */
	Collection<CrosswordEntry> getCrosswordEntries();	
}
